<script setup lang="ts">
defineProps<{
  bgColor?: string;

  hideBgImg?: boolean;
}>();
</script>

<template>
  <view class="relative mx-2.5">
    <view class="leading-[0]">
      <image
        v-if="!hideBgImg"
        class="w-full"
        src="/static/svg/contentbox-header-bg.svg"
        mode="widthFix"
      />
    </view>

    <view
      class="-mt-[1px]"
      :class="
        (!hideBgImg ? 'rounded-b-xl' : 'rounded-xl') +
        ' ' +
        (!bgColor ? 'bg-white' : bgColor)
      "
    >
      <slot />
    </view>
  </view>
</template>
